﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GC_School_of_Careers
{
    public partial class ucstudent : UserControl
    {
        public ucstudent()
        {
            InitializeComponent();
            // TODO: This line of code loads data into the 'dtstudent.CUSTOMER' table. You can move, or remove it, as needed.
            this.cUSTOMERTableAdapter.Fill(this.dtstudent.CUSTOMER);
         
        }

        private void toolStripLabel1_Click(object sender, EventArgs e)
        {

        }

        private void gbstudent_Enter(object sender, EventArgs e)
        {

        }

        private void toolStripLabel4_Click(object sender, EventArgs e)
        {

        }

        private void txtstudentcode_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0];
            dv.RowFilter = "CODE Like " + "'%" + txtstudentcode.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }

        private void txtstudentname_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0];
            dv.RowFilter = "NAME Like " + "'%" + txtstudentname.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }

        private void txtstudentformcode_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0];
            dv.RowFilter = "FORMCODE Like " + "'%" + txtstudentformcode.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }

        private void txtstudentformname_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0];
            dv.RowFilter = "FORMDESCRIPTION Like " + "'%" + txtstudentformname.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }

        private void txtstudentcity_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0];
            dv.RowFilter = "CITY1 Like " + "'%" + txtstudentcity.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }

        private void txtstudentarea_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0];
            dv.RowFilter = "DISTRICT1 Like " + "'%" + txtstudentarea.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }

        private void txtstudentzipcode_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0];
            dv.RowFilter = "ZIPCODE1 Like " + "'%" + txtstudentzipcode.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }

        private void txtstudentphone_TextChanged(object sender, EventArgs e)
        {
            DataView dv = new DataView();
            dv.Table = this.dtstudent.Tables[0]; // dsSupplierItems.Tables[0]; 
            dv.RowFilter = "PHONE11 Like " + "'%" + txtstudentphone.Text + "%'"; // +txtSearchString.Text;
            dgcstudent.DataSource = dv;
        }


    }
}
